package org.example.route.mapper;

import org.apache.ibatis.annotations.*;
import org.example.route.model.dto.PriceQueryDTO;
import org.example.route.model.pojo.Route;
import org.example.route.model.pojo.StationRoute;

import java.util.List;

@Mapper
public interface RouteMapper {
    @Insert("insert into route (name) values (#{name})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    void add(Route route);

    List<Route> list(String name);


    @Select("select * from route where id = #{id}")
    Route getById(Long id);


    @Delete("delete from route where id = #{id}")
    void delete(Long id);
}
